//
//  SYRequestAPI+JiaoYan.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/5/6.
//  Copyright © 2019年 SanYi. All rights reserved.
//

NSString *const kSYJiaoyanBaseUrl = @"/research/ResearchService.svc/";


#import "SYRequestAPI+JiaoYan.h"

@implementation SYRequestAPI (JiaoYan)
//教研列表
+ (void)sy_researchServiceResearchListPage:(NSInteger)pageIndex
                                  pageSize:(NSInteger)pageSize
                                   success:(void(^)(NSMutableArray *dataArr))success
                                      fail:(FailBlock)fail
{
    NSString *url = SYStringWithPickFormat(kSYJiaoyanBaseUrl, @"ResearchList");
    NSDictionary *dict = @{@"pageIndex":SJStringWithFormat(pageIndex),
                           @"pageSize":SJStringWithFormat(pageSize)
                           };
    [SYRequestAPI postDataFromURLScheme:url parameterDictionary:dict success:^(id responseObject) {
        
    } fail:^(NSError *error) {
        if (fail) {
            fail(error);
        }
    }];
}
//创建小组
+ (void)sy_researchServiceAddxiaoId:(NSString *)xzId
                               name:(NSString *)name
                          introduce:(NSString *)introduce
                            numbers:(NSString *)numbers
                          startTime:(NSString *)startTime
                         finishTime:(NSString *)finishTime
                         accountIds:(NSString *)accountIds
                            success:(void(^)(BOOL isSuccess))success
                               fail:(FailBlock)fail
{
    NSString *url = SYStringWithPickFormat(kSYJiaoyanBaseUrl, @"Add");
    NSDictionary *dict = @{@"id":xzId,
                           @"name":name,
                           @"introduce":introduce,
                           @"numbers":numbers,
                           @"beginDate":startTime,
                           @"endDate":finishTime,
                           @"accountIds":accountIds
                           };
    [SYRequestAPI postDataFromURLScheme:url parameterDictionary:dict success:^(id responseObject) {
        
    } fail:^(NSError *error) {
        
    }];
    
    
}
//添加成员
+ (void)sy_researchServiceMemberAddId:(NSString *)xzId
                            accountId:(NSString *)accountId
                              success:(void(^)(BOOL isSuccess))success
                                 fail:(FailBlock)fail
{
    NSString *url = SYStringWithPickFormat(kSYJiaoyanBaseUrl, @"MemberAdd");
    NSDictionary *dict = @{
                           @"id":xzId,
                           @"accountId":accountId
                           };
    [SYRequestAPI postDataFromURLScheme:url parameterDictionary:dict success:^(id responseObject) {
        
    } fail:^(NSError *error) {
        
    }];
    
}




@end





















